package cn.wolfcode.qo;

import cn.wolfcode.enums.ConsumptionReportEnums;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter
@Setter
public class ConsumptionReportQueryObject extends QueryObject {
   private String groupByName = ConsumptionReportEnums.BUSINESS.name();
   private Long businessId;
  public String getGroupBy(){
      return ConsumptionReportEnums.valueOf(this.groupByName).getSql();
  }
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;
    private Long typeId;
}
